//快手支付
export class KSMiniProgramPayment {
  pay(payInfoObj) {
    return new Promise((resolve, reject) => {
      try {
        ks?.navigateTo({
          url: `/pages-main-affiliate/pages/pay-page/index?payConfig=${window.btoa(
            JSON.stringify(payInfoObj.payInfo)
          )}&spu_id=${payInfoObj.spu_id}&app_id=${
            payInfoObj.payInfo.app_id
          }&isTeam=${payInfoObj.isTeam}`,
        });
        resolve();
      } catch (error) {
        reject(error);
      }
    });
  }
}
